/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.etop.odbs.beans;

import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author cjh
 */
@Entity
@Table(name = "user")
public class User {

    private int id;         
    private String phone;       //用户电话号码
    private String email;       //用户邮箱
    private String password;    //用户的密码
    private int age;            //用户的年龄
    private Date birthday;      //用户的生日
    private String blog;        //博客
    private int gender;         //性别（0为女，1为男）
    private String image;       //用户头像的位置
    private String introduction;//用户的简介
    private String nickname;    //用户的昵称
    private int point;          //用户的积分
    private int isAdmin;        //是否为管理员（0表示非管理员，1表示管理员）

    public User() {
    }

    @Id
    @GeneratedValue
    public int getId() {
        return id;
    }

    public String getPhone() {
        return phone;
    }

    public String getEmail() {
        return email;
    }

    public String getPassword() {
        return password;
    }

    public int getAge() {
        return age;
    }

    public Date getBirthday() {
        return birthday;
    }

    public String getBlog() {
        return blog;
    }

    public int getGender() {
        return gender;
    }

    public String getImage() {
        return image;
    }

    public String getIntroduction() {
        return introduction;
    }

    public String getNickname() {
        return nickname;
    }

    public int getPoint() {
        return point;
    }

    public int getIsAdmin() {
        return isAdmin;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public void setBlog(String blog) {
        this.blog = blog;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public void setPoint(int point) {
        this.point = point;
    }

    public void setIsAdmin(int isAdmin) {
        this.isAdmin = isAdmin;
    }

    @Override
    public String toString() {
        return "User{" + "id=" + id + ", nickname=" + nickname + ", gender=" + gender + ", point=" + point + '}';
    }

}
